<div class="febs-container">
    <div class="febs-body layui-fluid" lay-title="公司管理" id="febs-tenant">
        <div class="febs-body-search">
            <form class="layui-form layui-table-form" lay-filter="tenant-table-form" id="tenant-table-form">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                <div class="layui-input-inline" style="width: 280px;">
                                    <input type="text" name="tenantName" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline febs-hide">
                                <label class="layui-form-label layui-form-label-sm">公司简称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="shortName" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline febs-hide">
                                <label class="layui-form-label layui-form-label-sm">联系人</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="contact" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline febs-hide">
                                <label class="layui-form-label layui-form-label-sm">联系电话</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="contactNumber" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">状态</label>
                                <div class="layui-input-inline">
                                    <select name="status" lay-search="">
                                        <option value="">请选择状态</option>
                                        <option value="0">禁用</option>
                                        <option value="1" selected>启用</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div id="query" class="layui-btn">
                                    <em class="layui-icon">&#xe615;</em> 查询
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>

        <div class="febs-table-full">
            <table lay-filter="tenantTable" lay-data="{id: 'tenantTable'}"></table>
        </div>
    </div>
    <script type="text/html" id="tenantTable-toolbar">
        <div lay-event="add" class="layui-btn layui-btn-sm" th:if="${hasHeadCompanyRole}">
            <em class="layui-icon">&#xe654;</em> 新增
        </div>
    </script>
    <script type="text/html" id="status">
        {{#  if(d.status==1){ }}
        <input type="checkbox" shiro:hasPermission="tenant:update" name="status" lay-skin="switch" checked
               lay-text="启用|禁用" value={{ d.tenantId }}
               lay-filter="status">
        {{#  } else { }}
        <input type="checkbox" shiro:hasPermission="tenant:update" name="status" lay-skin="switch" lay-text="启用|禁用"
               value={{ d.tenantId}}
               lay-filter="status">
        {{#  } }}
    </script>
    <script type="text/html" id="tenant-option">
        <span shiro:lacksPermission="tenant:update,tenant:delete">
            <span class="layui-badge-dot febs-bg-orange"></span> 无权限
        </span>
        <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="tenant:update">
            <i class="layui-icon layui-icon-edit"></i>
            编辑
        </button>
        <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="tenant:delete" th:if="${hasHeadCompanyRole}">
            <i class="layui-icon layui-icon-delete"></i>
            删除
        </button>
    </script>

    <script th:src="@{/febs/js/system/tenant/tenant.js(v=1)}"></script>
</div>